package com.wtc.static_;

public class StaticMethod {
    public static void main(String[] args) {
        Stu make = new Stu("make");
        Stu.payFee(500);
        Stu hehe = new Stu("hehe");
        Stu.payFee(600);
        Stu.showFee();
    }
}
class Stu {
    private String name;
    public static double fee = 0;

    public Stu(String name) {
        this.name = name;
    }
    public static void payFee(double fee) {
        Stu.fee += fee;
    }
    public static void showFee() {
        System.out.println("学费共有：" + Stu.fee);
    }
}
